home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1998 August / PC Direct August 1998.iso / S / powerj / Product / hpp.z / MMDATA.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-25  |  14.6 KB  |  450 lines

  1. #ifndef _MMDATA_HPP
  2. #define _MMDATA_HPP
  3.  
  4. #ifndef _WNO_PRAGMA_PUSH
  5. #pragma pack(push,4);
  6. #pragma enum int;
  7. #endif
  8.  
  9. #include "mmdef.hpp"
  10.  
  11. //
  12. // This version number is used to ensure that all DT-.dll's match
  13. // up with the current header files.  If you modify the data structures
  14. // in mmdata.hpp, or modify the class layout of any header file shared
  15. // between DT-.dll's, then increment this version number.
  16. //
  17. // The version number should be YYYYMMDD (year,month,day).
  18. //
  19.  
  20. #define CURRENT_COMPDLL_VERSION (0x19970820)
  21.  
  22. struct MMSize {
  23.     int w;      // width
  24.     int h;      // height
  25. };
  26.  
  27. /************************
  28.  *** Type definitions ***
  29.  ************************/
  30.  
  31. //
  32. // Make sure that all of the entries in this enum are unique within
  33. // a block.
  34. //
  35.  
  36. enum MMDataFlags {
  37.     MTF_None =                  0x00000000,
  38.  
  39.         // MMType flags
  40.     MTF_TypeEnum =              0x00000001, // enumeration type
  41.     MTF_TypeDesignTime =        0x00000002, // type is available at DT
  42.  
  43.         // MMComponent flags
  44.     MTF_ComponentNonVisual =    0x00000001, // component is not a WWindow
  45.     MTF_ComponentNeedClass =    0x00000002, // need GetRegisteredClass call
  46.     MTF_ComponentIsComponent =  0x00000004, // is a "Component"
  47.     MTF_ComponentInvisible =    0x00000008, // not a visible class
  48.     MTF_ComponentRequireForm =  0x00000010, // don't put it on a visual class
  49.     MTF_ComponentEventOverride= 0x00000020, // event data structure overrides
  50.     MTF_ComponentIsJavaBean =   0x00000040, // event data structure overrides
  51.     MTF_ComponentIsJavaApplet = 0x00000080, // event data structure overrides
  52.     MTF_ComponentHasClass =     0x00000100, // has a class in the classes view
  53.     MTF_ComponentIsContainer =  0x00000200, // allows children
  54.     MTF_ComponentIsJavaInterface =  0x00000400, // a Java interface
  55.  
  56.         // MMParameter flags
  57.     MTF_ParmOptional =          0x00000001, // parameter not required
  58.  
  59.         // MMProperty flags
  60.     MTF_PropRunTimeCode =       0x00000001, // code required to set
  61.     MTF_PropRunTimeOnly =       0x00000002, // not available at design time
  62.     MTF_PropStyle =             0x00000004, // a style property
  63.     MTF_PropRedrawRequired =    0x00000008, // changing property needs redraw
  64.     MTF_PropReadOnly =          0x00000010, // property is read-only
  65.     MTF_PropWriteOnly =         0x00000020, // property is write-only
  66.     MTF_PropSaved =             0x00000040, // property is saved to file?
  67.     MTF_PropMapped =            0x00000080, // not live at design time
  68.     MTF_PropExtended =          0x00000100, // extended style
  69.     MTF_PropClone =             0x00000200, // clone on set
  70.     MTF_PropFDXEnabled =        0x00000400, // property can be FDX enabled
  71.     MTF_PropCreateTime =        0x00000800, // property must be set before Create
  72.     MTF_PropBound =             0x00001000, // property fires PropertyChange event
  73.     MTF_PropConstrained =       0x00002000, // property fires VetoableChange event
  74.  
  75.         // MMMethod flags
  76.     MTF_MethodDefaultRet =      0x00000001,
  77.  
  78.         // MMEvent flags
  79.     MTF_EventOverride =         0x00000001, // event data structure overrides
  80.     MTF_EventOLE =              0x00000002, // event is an OLE event
  81.     MTF_EventListener =         0x00000004, // event has a listener (Java)
  82.  
  83.         // MMPropertyControl flags
  84.     MTF_PropCtrlStyle =         0x00000001, // property control for a style
  85.     MTF_PropCtrlHasPush =       0x00000002, // has associated command button
  86.     MTF_PropCtrlFirstOption =   0x00000004, // first option button in a group
  87.     MTF_PropCtrlLastOption =    0x00000008, // last option button in a group
  88.     MTF_PropCtrlCustom =        0x00000010, // custom control
  89.     MTF_PropCtrlHalfWidth =     0x00000020, // takes full dialog width
  90.     MTF_PropCtrlCheck =         0x00100000, // checkbox
  91.     MTF_PropCtrlRadio =         0x00200000, // radio button
  92.     MTF_PropCtrlCombo =         0x00300000, // combo box
  93.     MTF_PropCtrlEdit =          0x00400000, // edit box
  94.     MTF_PropCtrlTypeMask =      0x00700000, // mask bits for type
  95.  
  96.         // MMPropertyGroup flags
  97.     MTF_PropGroupHasGroupbox =  0x00000001, // group displays a groupbox
  98.     MTF_PropGroupHalfWidth =    0x00000002, // group occupies full width
  99.  
  100.         // MMPropertySheet flags
  101.     MTF_PropSheetCustom =       0x00000001, // page is custom
  102.  
  103.         // MMPropertySheetThunk flags
  104.     MTF_PropSheetThunkSnapped = 0x00000001, // reference resolved
  105.  
  106.         // MMReferenceItem flags
  107.     MTF_RefItemComponent =      0x10000000, // MMComponent *
  108.     MTF_RefItemMethod =         0x20000000, // MMMethod *
  109.     MTF_RefItemStyle =          0x30000000, // MMStyle *
  110.     MTF_RefItemProperty =       0x40000000, // MMProperty *
  111.     MTF_RefItemTypeMask =       0x70000000,
  112.  
  113.         // MMFunction flags
  114.     MTF_FunctionSnapped =       0x00000001, // string was snapped into pointer
  115.  
  116.         // MMLibrary tags
  117.     MTF_LibraryOLE =            0x00000001, // library is an OLE library
  118.     MTF_HasNoRuntime =          0x00000002, // has a runtime
  119. };
  120.  
  121. /********************
  122.  *** MMCommonData ***
  123.  ********************/
  124.  
  125. struct MMCommonData {
  126.     MMIndex                 index;      // index of this object
  127.     MMString                name;       // NULL is invalid
  128.     MMDataFlags             flags;      // bit-field of flags
  129. };
  130.  
  131.  
  132. /**********************
  133.  *** MMBaseTypeData ***
  134.  **********************/
  135.  
  136. struct MMBaseTypeData : public MMCommonData {           // 12
  137. };
  138.  
  139. /************************
  140.  *** MMEnumeratorData ***
  141.  ************************/
  142.  
  143. struct MMEnumeratorData : public MMCommonData {         // 16
  144.     WDWord                  value;
  145. };
  146.  
  147. /******************
  148.  *** MMTypeData ***
  149.  ******************/
  150.  
  151. struct MMTypeData : public MMBaseTypeData {             // 28
  152.     unsigned                numValues;      // number of enumerators
  153.     MMIndex                 firstValue;     // index of the first one
  154.     MMString                browseName;     // name for browse button
  155.     MMDTTypeFnIndex         makeFn;         // function to make type
  156.     MMString                typeName;       // the friendly name of the DT-Type class
  157. };
  158.  
  159. /*******************
  160.  *** MMEventData ***
  161.  *******************/
  162.  
  163. struct MMEventData : public MMCommonData {
  164.     MMString                eventIdentifier;
  165.     MMString                eventStruct;
  166.     MMString                description;
  167.     MMIndex                 firstEventOverride;
  168.     MMIndex                 parameterSets; // (MMParameterSetData *)
  169.     MMIndex                 listener;
  170. };
  171.  
  172. /***************************
  173.  *** MMEventListenerData ***
  174.  ***************************/
  175.  
  176. struct MMEventListenerData : public MMCommonData {
  177.     MMIndex                 event;
  178.     MMIndex                 metaObject;
  179.     MMIndex                 method;
  180.     MMString                addMethodName;
  181.     MMString                removeMethodName;
  182.     MMString                metaObjectName;
  183. };
  184.  
  185. /***************************
  186.  *** MMOverrideEventData ***
  187.  ***************************/
  188.  
  189. struct MMEventOverrideData : public MMCommonData {
  190.     MMIndex                 event;
  191.     MMIndex                 metaObject;
  192. };
  193.  
  194. /***********************
  195.  *** MMJavaInterfaceData ***
  196.  ***********************/
  197.  
  198. struct MMJavaInterfaceData : public MMCommonData {
  199.     MMIndex                 metaObject;
  200.     MMString                metaObjectName;
  201. };
  202.  
  203. /***********************
  204.  *** MMParameterData ***
  205.  ***********************/
  206.  
  207. struct MMParameterData : public MMCommonData {
  208.     MMIndex                 type;       // (MMTypeData *)required -- not NULL
  209.     MMString                defVal;     // default value as text
  210. };
  211.  
  212. /**************************
  213.  *** MMParameterSetData ***
  214.  **************************/
  215.  
  216. struct MMParameterSetData : public MMCommonData {
  217.     MMIndex     returnType;             // (MMTypeData *)
  218.     unsigned    numParameters;
  219.     MMIndex     parameters;             // (MMParameterData *)
  220.     unsigned    numThrows;
  221.     MMIndex     throws;                 // (MMString *)
  222. };
  223.  
  224. /****************
  225.  *** MMHelpID ***
  226.  ****************/
  227.  
  228. struct MMHelpID {
  229.     MMString    file;
  230.     WHelpType   command;
  231.     WDWord      data;
  232. };
  233.  
  234. /**************************
  235.  *** MMBasePropertyData ***
  236.  **************************/
  237.  
  238. struct MMBasePropertyData : public MMCommonData {
  239.     MMIndex             type;   // (MMTypeData *) pointer to type resolved later
  240.     MMSetFnIndex        setFn;  // (MMSetPropFn)
  241.     MMGetFnIndex        getFn;  // (MMGetPropFn)
  242.     MMPropDefFnIndex    defFn;  // (MMPropDefault)
  243.     WLong               defCookie;  // default cookie
  244.     WLong               priority;
  245.     WLong               contextHelpID;
  246. };
  247.  
  248. /*******************
  249.  *** MMStyleData ***
  250.  *******************/
  251.  
  252. struct MMStyleData : public MMBasePropertyData {
  253.     WStyle          style;
  254.     WStyle          mask;
  255.     MMString        resString;
  256. };
  257.  
  258.  
  259. /**********************
  260.  *** MMPropertyData ***
  261.  **********************/
  262.  
  263. struct MMPropertyData : public MMBasePropertyData {
  264.     unsigned                    numParameterSets;
  265.     MMIndex                     parameterSets;  //(MMParameterSetData *)
  266.     MMHelpID                    helpID;
  267.     MMString                    defaultMapped;  // initial value if deferred
  268.     MMPropMakeEditorFnIndex     makeEditorFn;   // (MMPropMakeEditor)
  269.     MMString                    propertyEditor;
  270. };
  271.  
  272. /********************
  273.  *** MMMethodData ***
  274.  ********************/
  275.  
  276. struct MMMethodData : public MMCommonData {
  277.     unsigned        numParameterSets;
  278.     MMIndex         parameterSets; // (MMParameterSetData *)
  279.     MMHelpID        helpID;
  280. };
  281.  
  282. /*****************************
  283.  *** MMPropertyControlData ***
  284.  *****************************/
  285.  
  286. struct MMPropertyControlData : public MMCommonData {
  287.     WDWord                      resourceID;
  288.     MMIndex                     property;       // (const MMBasePropertyData *)
  289.     MMString                    label;
  290.     MMPropCtrlFnIndex           makeControl;    // (MMMakePropControl)
  291.     WLong                       priority;
  292. };
  293.  
  294. /***************************
  295.  *** MMPropertyGroupData ***
  296.  ***************************/
  297.  
  298. struct MMPropertyGroupData : public MMCommonData {
  299.     MMString                    description;
  300.     MMIndex                     firstControl;
  301.     WUInt                       numControl;
  302. };
  303.  
  304. /****************************
  305.  *** MMPropertySheetThunk ***
  306.  ****************************/
  307.  
  308. struct MMPropertySheetThunk : public MMCommonData {
  309.     MMString                component;
  310.     MMString                sheet;
  311.     MMIndex                 snapped;
  312. };
  313.  
  314. /***************************
  315.  *** MMPropertySheetData ***
  316.  ***************************/
  317.  
  318. struct MMPropertySheetData : public MMCommonData {
  319.     MMPropSheetFnIndex      makeSheet;  // (MMMakePropSheet)
  320.     MMString                desc;
  321.     WDWord                  resourceID;
  322.     WUInt                   numCtrls;
  323.     MMIndex                 ctrls;      // (const MMPropertyControlData *)
  324.     WUInt                   numGroups;
  325.     MMIndex                 firstGroup;
  326. };
  327.  
  328. /***************************
  329.  *** MMReferenceNodeData ***
  330.  ***************************/
  331.  
  332. struct MMReferenceNodeData : public MMCommonData {
  333.     MMIndex                 item;       // (const MMCommonData *)
  334.     MMIndex                 sibling;    // (const MMReferenceNodeData *)
  335.     MMIndex                 child;      // (const MMReferenceNodeData *)
  336. };
  337.  
  338.  
  339. /***********************
  340.  *** MMComponentData ***
  341.  ***********************/
  342.  
  343. enum MMComponentDataSets {
  344.     MMCDS_Events,               //(const MMEventData *)
  345.     MMCDS_HotEvents,            //(const MMEventData *)
  346.     MMCDS_Styles,               //(const MMStyleData *)
  347.     MMCDS_Properties,           //(const MMPropertyData *)
  348.     MMCDS_Methods,              //(const MMMethodData *)
  349.     MMCDS_PropertySheets,       //(const MMPropertySheetData *)
  350.     MMCDS_Includes,             // MMIndex *
  351.     MMCDS_DDXTypes,             // MMIndex *
  352.     MMCDS_JavaInterfaces,       //(const MMJavaInterfaceData *)
  353.     MMCDS_Last
  354. };
  355.  
  356. struct MMComponentDataSet {
  357.     WUInt       numElements;
  358.     MMIndex     elements;
  359. };
  360.  
  361. struct MMComponentData : public MMCommonData {
  362.     MMString                    desc;
  363.     MMString                    varname;
  364.     MMString                    toolPage;
  365.     MMString                    toolPalette;
  366.     WInt                        toolPriority;
  367.     MMString                    refTag;
  368.     MMString                    baseObject;
  369.     WDWord                      toolBitmaps[ 3 ];
  370.  
  371.     MMComponentDataSet          dataSets[ MMCDS_Last ];
  372.  
  373.     MMIndex                     ddxProperty;//(const MMPropertyData *)
  374.     MMIndex                     refNodes;   // full hierarchy
  375.  
  376.     MMHelpID                    helpID;
  377.     WDWord                      nonVisualResID;
  378.  
  379.     MMSize                      defSize;    // default component size
  380.     MMDTInstFnIndex             makeDT;     // function index to make DTObj
  381.  
  382.     MMString                    reserved;
  383.     MMString                    javaCustomizerClass;
  384. };
  385.  
  386. /*********************
  387.  *** MMLibraryData ***
  388.  *********************/
  389.  
  390. enum MMLibraryDataSets {
  391.     MMDS_Enumerators,
  392.     MMDS_Types,
  393.     MMDS_Events,
  394.     MMDS_EventOverrides,
  395.     MMDS_EventListeners,
  396.     MMDS_Styles,
  397.     MMDS_Properties,
  398.     MMDS_Methods,
  399.     MMDS_Parameters,
  400.     MMDS_ParameterSets,
  401.     MMDS_PropertyControls,
  402.     MMDS_PropertyGroups,
  403.     MMDS_PropertySheetThunks,
  404.     MMDS_PropertySheets,
  405.     MMDS_Components,
  406.     MMDS_ReferenceNodes,
  407.     MMDS_StringTables,
  408.     MMDS_Indices,
  409.     MMDS_Library,
  410.     MMDS_JavaInterfaces,
  411.     MMDS_Last,
  412. };
  413.  
  414. struct MMLibraryDataSet {
  415.     WUInt       numElements;
  416.     MMOffset    elements;
  417. };
  418.  
  419. struct MMLibraryData : public MMCommonData {
  420.     WULong                      compdllVersion;
  421.     WULong                      libVersion;
  422.     MMLibraryDataSet            dataSets[ MMDS_Last ];
  423.  
  424. //
  425.     WUInt                       numGblMethods;
  426.     MMIndex                     gblMethods;
  427.  
  428.     MMIndex                     refRoot;        // root of hierarchy
  429.     MMString                    refTag;
  430.     MMString                    description;    // describe the library
  431.     MMString                    scopeName;      // name space for the lib
  432.  
  433.     WUInt                       numIncludes;
  434.     MMIndex                     includes;       // (MMString *)
  435.  
  436.     MMLanguage                  language;       // Cpp or Java or ...
  437.     MMString                    contextHelpFile;
  438.  
  439.     MMString                    includePath;
  440. };
  441.  
  442.  
  443. #ifndef _WNO_PRAGMA_PUSH
  444. #pragma enum pop;
  445. #pragma pack(pop);
  446. #endif
  447.  
  448.  
  449. #endif // _MMDATA_HPP
  450.